package com.cnebula.common.hadoop.oozie.client.impl;

import java.util.ArrayList;
import java.util.List;

import org.junit.Before;
import org.junit.Test;

import junit.framework.Assert;

public class TestOozieHttpClient {
	
	OozieHttpClient oozieHttpClient;
	
	@Before
	public void before(){
		oozieHttpClient = new OozieHttpClient();
	}
	
	@Test
	public void testOkStatus(){
		List<Integer> oks = new ArrayList<Integer>();
		oks.add(200);
		oks.add(201);
		
		List<Integer> okstatus = oozieHttpClient.getOkStatus();
		
		Assert.assertTrue(okstatus.size() == oks.size());
		
		oks.removeAll(okstatus);
		Assert.assertEquals(oks.size(), 0);
	}
}
